<?php
/**
 * 初始化
 * @author wangtao
 * @version 2011.12.26
 */


include WT_ROOT . 'library/globals.php';
include WT_ROOT . 'library/function.php';
include WT_ROOT . 'library/WT_FEED.php';
include WT_ROOT . 'library/wt_uri.php';
include WT_ROOT . 'library/mysqlDB.php';

include WT_ROOT . 'model/feed.php';

include WT_ROOT . 'smarty/Smarty.class.php';

#MJBOX默认方法 # defaultMethod
define('DEFAULT_METHOD', 'html');
#MJBOX默认类 # defaultMethod
define('DEFAULT_APP', 'index');
#MJBOX运行环境所使用的字符(mysql)
define('MJ_CHAR', 'utf8');
#开启重写
define('REWRITE', true);
define('XML_ROOT', WT_ROOT . 'smartyFile/XML/');

/**
 * 初始模板相关参数，
 * @author wangtao
 */
class smasrty extends Smarty
{
	function __construct()
	{
		$webroot = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'x.wt';
		$this-> template_dir	= WT_ROOT . 'template';
		$this -> compile_dir	= WT_ROOT . 'Cache/compile';
		$this -> config_dir		= WT_ROOT . 'config';
		$this -> cache_dir		= WT_ROOT . 'Cache/static';
		$this->assign('WEBROOT', 'http://' . $webroot . '/');
	}
}

define('DBHOST', '127.0.0.1');
define('DBUSER', 'root');
define('DBPASSW', 'yunlian');
define('DBNAME', 'feed');
define('DBCHAR', 'utf8');

define('WT_CHARSET', 'UTF-8');

?>